<!--
 * @Description: 
 * @Author: mxy
 * @Date: 2022-11-27 21:14:55
 * @LastEditors: mxy
 * @LastEditTime: 2022-11-27 21:14:56
-->
<!--
 * @Description: 
 * @Author: mxy
 * @Date: 2022-11-27 20:37:20
 * @LastEditors: mxy
 * @LastEditTime: 2022-11-27 21:14:52
-->
<template>
  <div>
    <h2>指令修饰符</h2>
    <form action="">
      <input type="text" value="123" @keyup.enter="two" />
      <button @click.prevent="one">按钮</button>
      <!-- 
        常见的修饰符,修饰符都可以连用
        .prevent
        .stop
        .enter
       -->
    </form>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  methods: {
    one() {
      console.log(111);
    },
    two() {
      console.log(222);
    },
  },
};
</script>

<style>
h2 {
  color: red;
}
</style>
